<template>
  <a-card>
    <div class="table-page-search-wrapper virture">
      <a-form layout="inline" @keyup.enter.native="sendVirture">
        <a-form-item label="OMS编号" class="form-item">
          <a-input v-model="omsId" placeholder="请输入" style="width:300px" allowClear onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" />
          <a-button type="primary" @click="sendVirture" style="margin-left:16px">虚拟发货</a-button>
        </a-form-item>
      </a-form>
    </div>
  </a-card>
</template>
<script>
import { sendVirtureOms } from '@/api/box/order'
export default {
  data() {
    return {
      omsId: ''
    }
  },
  methods: {
    sendVirture() {
      if (this.omsId) {
        let params = {
          requestData: {
            omsId: parseInt(this.omsId)
          }
        }
        sendVirtureOms(params).then(res => {})
      } else {
        this.$message.warning('请输入OMS编号！')
      }
    }
  }
}
</script>
<style lang="less" scoped>
.virture {
  min-height: calc(100vh - 220px);
  padding-top: 200px;
  /deep/.ant-form-item {
    display: flex;
    justify-content: center;
    .ant-form-item-control-wrapper {
      flex: initial !important;
    }
  }
}
</style>

